<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="robots" content="index, follow, all" />
        <title>Imagine\Image\Color | Imagine API</title>
                    <link rel="stylesheet" type="text/css" href="../../stylesheet.css">
                            </head>
        <body id="class">
            <div class="header">
        <ul>
            <li><a href="../../classes.html">Classes</a></li>
                            <li><a href="../../namespaces.html">Namespaces</a></li>
                        <li><a href="../../interfaces.html">Interfaces</a></li>
            <li><a href="../../doc-index.html">Index</a></li>
            
        </ul>

        <div id="title">Imagine API</div>

            <div class="type">Class</div>
    <h1><a href="../../Imagine/Image.html">Imagine\Image</a>\Color</h1>
    </div>
        <div class="content">
                <p>class    <strong>Color</strong></p>

            <div class="description">
            <p>The color class</p>
            <p>
</p>
        </div>
    
    
    
            <h2>Methods</h2>

            <table>
                    <tr>
                <td class="type">
                    
                </td>
                <td class="last">
                    <a href="#method___construct">__construct</a>(array|string|integer $color, integer $alpha)
                    <p>Constructs image color, e.g.:     - new Color('fff') - will produce non-transparent white color     - new Color('ffffff', 50) - will product 50% transparent white     - new Color(array(255, 255, 255)) - another way of getting white     - new Color(0x00FF00) - hexadecimal notation for green</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    integer
                </td>
                <td class="last">
                    <a href="#method_getRed">getRed</a>()
                    <p>Returns RED value of the color</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    integer
                </td>
                <td class="last">
                    <a href="#method_getGreen">getGreen</a>()
                    <p>Returns GREEN value of the color</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    integer
                </td>
                <td class="last">
                    <a href="#method_getBlue">getBlue</a>()
                    <p>Returns BLUE value of the color</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    integer
                </td>
                <td class="last">
                    <a href="#method_getAlpha">getAlpha</a>()
                    <p>Returns percentage of transparency of the color</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
                </td>
                <td class="last">
                    <a href="#method_dissolve">dissolve</a>(integer $alpha)
                    <p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
                </td>
                <td class="last">
                    <a href="#method_lighten">lighten</a>(integer $shade)
                    <p>Returns a copy of the current color, lightened by the specified number of shades</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
                </td>
                <td class="last">
                    <a href="#method_darken">darken</a>(integer $shade)
                    <p>Returns a copy of the current color, darkened by the specified number of shades</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    string
                </td>
                <td class="last">
                    <a href="#method___toString">__toString</a>()
                    <p>Returns hex representation of the color</p>
                </td>
                <td></td>
            </tr>
                    <tr>
                <td class="type">
                    Boolean
                </td>
                <td class="last">
                    <a href="#method_isOpaque">isOpaque</a>()
                    <p>Checks if the current color is opaque</p>
                </td>
                <td></td>
            </tr>
            </table>


        <h2>Details</h2>

                        <h3 id="method___construct">
        <div class="location">at line 51</div>
        <code>            public            
    <strong>__construct</strong>(array|string|integer $color, integer $alpha)</code>
    </h3>
    <div class="details">
        <p>Constructs image color, e.g.:     - new Color('fff') - will produce non-transparent white color     - new Color('ffffff', 50) - will product 50% transparent white     - new Color(array(255, 255, 255)) - another way of getting white     - new Color(0x00FF00) - hexadecimal notation for green</p>
        <p>
</p>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table>
                    <tr>
                <td>array|string|integer</td>
                <td>$color</td>
                <td>
</td>
            </tr>
                    <tr>
                <td>integer</td>
                <td>$alpha</td>
                <td>
</td>
            </tr>
            </table>

            
            
            
                    </div>
    </div>

                <h3 id="method_getRed">
        <div class="location">at line 62</div>
        <code>            public            integer
    <strong>getRed</strong>()</code>
    </h3>
    <div class="details">
        <p>Returns RED value of the color</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>integer</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_getGreen">
        <div class="location">at line 72</div>
        <code>            public            integer
    <strong>getGreen</strong>()</code>
    </h3>
    <div class="details">
        <p>Returns GREEN value of the color</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>integer</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_getBlue">
        <div class="location">at line 82</div>
        <code>            public            integer
    <strong>getBlue</strong>()</code>
    </h3>
    <div class="details">
        <p>Returns BLUE value of the color</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>integer</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_getAlpha">
        <div class="location">at line 92</div>
        <code>            public            integer
    <strong>getAlpha</strong>()</code>
    </h3>
    <div class="details">
        <p>Returns percentage of transparency of the color</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>integer</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_dissolve">
        <div class="location">at line 105</div>
        <code>            public            <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
    <strong>dissolve</strong>(integer $alpha)</code>
    </h3>
    <div class="details">
        <p>Returns a copy of current color, incrementing the alpha channel by the given amount</p>
        <p>
</p>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table>
                    <tr>
                <td>integer</td>
                <td>$alpha</td>
                <td>
</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td><a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a></td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_lighten">
        <div class="location">at line 118</div>
        <code>            public            <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
    <strong>lighten</strong>(integer $shade)</code>
    </h3>
    <div class="details">
        <p>Returns a copy of the current color, lightened by the specified number of shades</p>
        <p>
</p>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table>
                    <tr>
                <td>integer</td>
                <td>$shade</td>
                <td>
</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td><a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a></td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_darken">
        <div class="location">at line 138</div>
        <code>            public            <a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a>
    <strong>darken</strong>(integer $shade)</code>
    </h3>
    <div class="details">
        <p>Returns a copy of the current color, darkened by the specified number of shades</p>
        <p>
</p>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table>
                    <tr>
                <td>integer</td>
                <td>$shade</td>
                <td>
</td>
            </tr>
            </table>

            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td><a href="../../Imagine/Image/Color.html"><abbr title="Imagine\Image\Color">Color</abbr></a></td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method___toString">
        <div class="location">at line 230</div>
        <code>            public            string
    <strong>__toString</strong>()</code>
    </h3>
    <div class="details">
        <p>Returns hex representation of the color</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>string</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

                <h3 id="method_isOpaque">
        <div class="location">at line 240</div>
        <code>            public            Boolean
    <strong>isOpaque</strong>()</code>
    </h3>
    <div class="details">
        <p>Checks if the current color is opaque</p>
        <p>
</p>
        <div class="tags">
            
                            <h4>Return Value</h4>

                    <table>
        <tr>
            <td>Boolean</td>
            <td>
</td>
        </tr>
    </table>

            
            
                    </div>
    </div>

    
            </div>
            <div id="footer">
        Generated by <a href="http://sami.sensiolabs.org/" target="_top">Sami, the API Documentation Generator</a>.
    </div>
    </body>
</html>
